Repository navigation
[Spec 1940] Stage 1 (in progress): named architects across workspaces on one Tower - #1957
Draft
waleedkadous wants to merge 93 commits into
Draft
waleedkadous wants to merge 93 commits into
waleedkadous wants to merge 93 commits into
Conversation
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…nvitation walkthrough, command surface
…builder rule, stage 2 walkthrough, connections per owner, existing code
…approval (main-31): front-door-only opt-in cut from stage 1
…istyped afx scheme fails with the shape meant
- The naming module tells workspaces apart by workspaceKey, never by the text of a path: a row and a running workspace that spell one directory two ways are one workspace, with the row's name. A lookup returns a running workspace in the spelling it runs under. - findWorkspaceByAddressName lower-cases the name itself.
…ot change Written and run against the code before any phase 4 production change: every same-workspace sender and recipient kind, a sender with no workspace or the workspace 'unknown', senders that are not agents, and raw sends.
…ands A message from an agent in another workspace is framed with the sender's workspace-qualified address, and its footer line carries a reply command the recipient is allowed to use, or says how to reply when there is none. - message-format: formatCrossWorkspaceMessage. The role comes from the address's kind; every address part is checked against the component rule. - tower-messages: refusalToAddress (the builder rule on its own) and crossWorkspaceOrigin, which asks it with the recipient as the sender and offers the front door only when the front door reaches the sender. - tower-routes: formatMessageForTarget takes a sender whose workspace is required by its type; all six call sites pass it. Same-workspace frames, senders with no known workspace, senders that are not agents and raw sends are unchanged.
…n the sender's own address is refused
waleedkadous
added a commit
that referenced
this pull request
Nov 24, 2026
…resses ready to paste
…nd the first commit of phase 6
…kspace list, workspace name and whoami Right after an upgrade the new CLI meets the Tower that was already running. - afx workspace list and afx workspace name printed a bare 'Not found' for the route that Tower does not have. The SDK now marks that answer (a 404 with no code) and both commands say the Tower is older and how to restart it. - afx whoami told someone whose Tower was running to start it. It now checks for the address_name column and says the database has not been migrated by a Tower of this version; any other read failure is reported as itself. - afx workspace list keeps every field from Tower to one printable line, not only the path and the reason. Tested against the old shapes: a transport answering as the older Tower does, and a global.db at schema 19, which then gives the address once the real migration has run.
… does not know <workspace>:architect:<name> A Tower from before Spec 1940 reads the new form with its own parser, as a builder called architect:<name>, and answers that it was not found. That is the first thing a user types after upgrading. When a send of that form comes back NOT_FOUND, and only then, the CLI asks the address-book route: a Tower with no such route is the older one, and the error says so with the restart commands; a Tower that answers knows the form and its not-found stands. Tested against a transport that answers as the older Tower does.
…e list and name, and reply commands, in both trees CLAUDE.md and AGENTS.md (identical), the four templates, the afx skill in its four copies with regenerated hashes, the command reference and the role docs in both trees, and arch.md: <workspace>:architect:<name> for architects and humans, the front door for builders, afx workspace list as the way to find an address, afx workspace name, the whoami address, and the reply command a cross-workspace frame carries. Nothing on other Towers or other owners.
…eal Tower; a cross-workspace latency figure cross-workspace-addressing.e2e.test.ts starts a built Tower that has never connected to Codev Cloud and drives the CLI's own send, workspace name and workspace list commands as each agent. send-latency gains a second scenario, 100 sends to a named architect in another workspace, for the record.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft, opened early for CI. This pull request is not ready for review. It was opened part-way through implementation so that GitHub runs the full test suite on a clean runner, under the owner's standing ruling main-32 (a green GitHub run may stand in for porch's local tests check when the local suite fails only under machine load). The review phase finishes this pull request: the description below will be replaced, and the review document added, before it is marked ready.
What this is
Stage 1 of issue #1940 (Tower-to-Tower messaging: addressing, discovery, security model): named architects addressable across workspaces on one Tower. No second Tower, no transport, no Codev Cloud.
Spec:
codev/specs/1940-tower-to-tower-messaging-proto.mdPlan:
codev/plans/1940-tower-to-tower-messaging-proto.mdWhere it stands
In the branch so far
@cluesmith/codev-sdk/address, with the structuredAgentAddresswire type incodev-types, and one table of cases run by the SDK,packages/codevand the VS Code extension.<workspace>:architect:<name>resolves against live terminals and against the registry, so mail to a named architect in another workspace is delivered, or held when it has no live terminal.afx://address is refused as cross-Tower messaging not available.Adjacent bugs fixed in place
Both are older than this branch and were found by review of phase 2.
architect, the registry answered "the first registered" where the live resolver refuses (a builder whose spawning architect has gone, or a legacy builder, in a workspace with nomain). The send route consults the registry on any not-found, so that mail was held for, and then delivered to, an architect the builder had nothing to do with. The registry now refuses exactly where the live resolver does.getArchitectssorted by name, so with nomainan offline hold named the alphabetically first architect where a live send reached the first registered. It now ordersmainfirst, then by start time, asloadStatedoes. This also means a workspace's sibling architects are relaunched in registration order at workspace start.Why the draft exists now, and the local check that was skipped
On
d106d3984, porch's local tests check and one full local run failed with 92 timeouts in 17 test files, none touched by this branch, while the machine's load average was between 33 and 49. The same suite passed in full twice on the preceding commit.Under the owner's ruling main-32, phase 2's local full-suite check was skipped (porch's build check still ran), on these grounds:
6804f57c7(this branch withmainmerged in). The architect checked the run.mainwas merged into the branch (6df1df753) because the branch conflicted with it and GitHub runs no checks on a conflicting pull request. One conflict,packages/sdk/src/tower-client.ts: both sides added a field to the same two result shapes, and both are kept.The details are in
codev/state/spir-1940_thread.md.